	
**--------------------------------**
*** Run all the files for building income scores: 
**--------------------------------**

** CPI deflator 
	quietly run "$Mydirectory1\1_DataSources\CPI\CPI_deflator.do"
	
** Consumption Survey 1936
	quietly run "$Mydirectory1\1_DataSources\ConsumptionSurvey_1936\code\1a_clean_1936.do" 
	quietly run "$Mydirectory1\1_DataSources\ConsumptionSurvey_1936\code\2a_IncomeScores_1936.do"
	quietly run "$Mydirectory1\1_DataSources\ConsumptionSurvey_1936\code\2b_IncomeScores_othervariations_1936.do"
	quietly run "$Mydirectory1\1_DataSources\ConsumptionSurvey_1936\code\2c_IncomeScores_1936_merge.do" 		

** Census Data

	* 1940 Census -- these files are run inside the NBER server
	//quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\0a_Income_Scores_1940clean.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\0b_Income_Scores_1940_setup.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1a_Income_Scores_1940_byracebysouth.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1b_Income_Scores_1940_byracebysouth_byedu.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1c_Income_Scores_1940_occ.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1d_Income_Scores_1940_occbyrace.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1e_Income_Scores_1940_occbyracebyregion.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\1f_Income_Scores_1940_remaining_cells.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\2_Income_Scores_1940_byracebysouth_mothers.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\3_IncomeRatios_1940_byracebysouth.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NBERserver\4_Fathers_byOcc.do" 	
	
	** Cleaner do-files
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1910to2010_1pct_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1950_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1960_5pct_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1970_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1980_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\1990_cleaner.do" 
	quietly run "$Mydirectory1\1_DataSources\CensusData\input\RawData\2019_ACS_cleaner.do" 
	
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\OtherCensus_RawData\1900_cleaner.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\OtherCensus_RawData\1930_1940_1pct_ownershp.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\OtherCensus_RawData\1950to2000_all30to50_cleaner.do"		

	** 1950 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\2a_IncomeScore_1950_setup_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\2b_IncomeScore_1950_construct_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\2c_IncomeScore_1950_setup_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\2d_IncomeScore_1950_construct_mothers.do"
	
	** 1960 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\3a_IncomeScore_1960_setup_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\3b_IncomeScore_1960_construct_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\3c_IncomeScore_1960_setup_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\3d_IncomeScore_1960_construct_mothers.do"	
	
	** 1970 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\4a_IncomeScore_1970_setup_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\4b_IncomeScore_1970_construct_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\4c_IncomeScore_1970_setup_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\4d_IncomeScore_1970_construct_mothers.do"	
	
	** 1980 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\5a_IncomeScore_1980_setup_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\5b_IncomeScore_1980_construct_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\5c_IncomeScore_1980_setup_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\5d_IncomeScore_1980_construct_mothers.do"	
	
	** 1990 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\6a_IncomeScore_1990_setup_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\6b_IncomeScore_1990_construct_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\6c_IncomeScore_1990_setup_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\6d_IncomeScore_1990_construct_mothers.do"	
	
	** 2000-2020
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\7a_OccScore_2000_byrace_bysouth.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\7b_OccScore_2010_byrace_bysouth.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\7c_OccScore_2019_byrace_bysouth.do"
	
	
	** 1940 adjustments
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1a_Census1960_fathers30to50.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1b_Census1960_mothers30to50.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1c_Census1960_farmer_ratios.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1d_Census1960_self_emp_ratios.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1e_Census1960_NILF_ratios.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1f_Census_1960_income_to_earnings_ratios.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1g_Census1960_farmer_ratios_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\1940_adjustments\1h_Census1960_self_emp_ratios_mothers.do"		
	
	
	** Variations and appending 
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\8_IncomeScores_CWfixes.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\9a_IncomeScores_othervariations.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\9b_IncomeScores_othervariations_mothers.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\10_IncomeScores_Append.do"	

	** Shares for weights
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\Shares_for_weights\Shares_bysex_byrace.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\Shares_for_weights\Shares_byage_byedu_bysex_byrace.do"
	
	** Number of children per cohort
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NumberChildren_byCohort\1_NumberChildren_1910to1990_byCensus.do"
	quietly run "$Mydirectory1\1_DataSources\CensusData\code\NumberChildren_byCohort\2_NumberChildren_bycohort.do"
	

** 1900 Income Scores
	quietly run "$Mydirectory1\1_DataSources\1900_IncomeScores\code\1a_1901CostLiving_construct.do"
	quietly run "$Mydirectory1\1_DataSources\1900_IncomeScores\code\1b_CensusAg_farmerincome_construct.do"
	quietly run "$Mydirectory1\1_DataSources\1900_IncomeScores\code\2_1900incomescores_combine.do"
	

		
**--------------------------------**
*** Run all the files for cleaning surveys: 
**--------------------------------**


** Americans View their Mental Health, 1957
	quietly run "$Mydirectory1\1_DataSources\Americans_MentalHealth_1957\code\0_AVTMH1957_import_clean.do"
	quietly run "$Mydirectory1\1_DataSources\Americans_MentalHealth_1957\code\1_AVTMH1957_cleaner.do"
	
** Americans View their Mental Health, 1976
	quietly run "$Mydirectory1\1_DataSources\Americans_MentalHealth_1976\code\AVTMH1976_cleaner.do"
	
** American National Election Survey (ANES)
	quietly run "$Mydirectory1\1_DataSources\ANES\code\0_xwalk_xsectionid_to_panelid.do"
	quietly run "$Mydirectory1\1_DataSources\ANES\code\1_ANES_cleaner.do"
	quietly run "$Mydirectory1\1_DataSources\ANES\code\2_ANES_InterGenMobility.do"	
	
** CPS Occupational Changes in a Generation 1962 and 1973
	quietly run "$Mydirectory1\1_DataSources\CPS_1962_1973\code\0_ocg1962_data_input.do"
	quietly run "$Mydirectory1\1_DataSources\CPS_1962_1973\code\0_ocg1973_data_input.do"
	quietly run "$Mydirectory1\1_DataSources\CPS_1962_1973\code\1_ocg1962_clean.do"
	quietly run "$Mydirectory1\1_DataSources\CPS_1962_1973\code\1_ocg1973_clean.do"
	
** Fertility Study
	quietly run "$Mydirectory1\1_DataSources\FertilityStudy_1970\code\NFS70_clean.do"
	
** General Social Survey (GSS)	
	quietly run "$Mydirectory1\1_DataSources\GSS\code\1a_GSS_77to90_clean.do"
	quietly run "$Mydirectory1\1_DataSources\GSS\code\1b_GSS_88to10_clean.do"
	quietly run "$Mydirectory1\1_DataSources\GSS\code\1c_GSS_10to18_clean.do"
	quietly run "$Mydirectory1\1_DataSources\GSS\code\2_GSS_join_77to18_clean.do"
	
** National Survey of Families and Households
	quietly run "$Mydirectory1\1_DataSources\natl_survey_fam_HH\code\1_NSFHH_cleaner.do"
	
** National Longitudinal Survey, Mature Women
	quietly run "$Mydirectory1\1_DataSources\NLS_MatureWomen\code\1_NLSMW_clean.do"	
	
** National Longitudinal Survey, Older Men
	quietly run "$Mydirectory1\1_DataSources\NLS_older_men\code\1_NLSOM_cleaner.do"	
	
** National Longitudinal Survey of Youth, 1979
	quietly run "$Mydirectory1\1_DataSources\NLSY79\code\cleanup_nlsy79_xsec.do"	
	
** National Longitudinal Survey, Young Men
	quietly run "$Mydirectory1\1_DataSources\NLSYM66\code\1_cleanup_nlsym66_newxsec.do"	
	
** National Longitudinal Survey, Young Men
	quietly run "$Mydirectory1\1_DataSources\NLSYW68\code\1_cleanup_nlsyw68_newxsec.do"	
	
** National Survey of Black Americans
	quietly run "$Mydirectory1\1_DataSources\NSBA\code\nsba_clean.do"	
	
** PSID 1997
	quietly run "$Mydirectory1\1_DataSources\PSID97_CrossSection\code\0_fims_sibmap_wide.do"
	quietly run "$Mydirectory1\1_DataSources\PSID97_CrossSection\code\psid1997_clean.do"	
	
** PSID 2017	
	quietly run "$Mydirectory1\1_DataSources\PSID17_CrossSection\code\psid2017_clean.do"

** PSID, multiple waves	
	quietly run "$Mydirectory1\1_DataSources\PSID\code\0_PSID_prelimfiles.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\1_PSID_IGEclean.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\2a_PSID_retrospective_children.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\2b_PSID_retrospective_fathers.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\2c_PSID_retrospective_verify.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\2d_PSID_recall_matrix.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\Actual_vs_predictedincome\1_PSID_bothparents_clean.do"
	quietly run "$Mydirectory1\1_DataSources\PSID\code\Actual_vs_predictedincome\2_PSID_incscores_bothparents.do"
		
		
**--------------------------------**
*** Run all the files to append all surveys and income scores:
**--------------------------------**

	quietly run "$Mydirectory1\2_Append\1_Append_Datasets.do"
	quietly run "$Mydirectory1\2_Append\2_Clean_PooledData.do"
	quietly run "$Mydirectory1\2_Append\3_Append_Census_Surveys.do"
	quietly run "$Mydirectory1\2_Append\4_TSIV_twosample_build.do"

	

	
